<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>006-js的内部写法</title>
	<style>
		*{
			margin: 0;
			padding: 0;
		}
		.box{
			width: 200px;
			height: 200px;
			border: 1px solid #000;
			margin: 100px auto;
			background-color: red;
		}
	</style>
	<script>
		/* 函数 */
		function toBig(){
			var oDiv = document.getElementById('box');
			oDiv.style.width='400px';
			oDiv.style.height='400px';
			oDiv.style.backgroundColor='skyblue';
		}
		function toSmall(){
			var oDiv = document.getElementById('box');
			oDiv.style.width='200px';
			oDiv.style.height='200px';
			oDiv.style.backgroundColor='blue';
		}
	</script>
</head>
<body>
	<div id="box" class="box" onmouseover="toBig()" onmouseout="toSmall()"></div>
</body>
</html>